home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Games / MAME / src / drivers / blktiger.c < prev    next >
C/C++ Source or Header  |  2000-05-04  |  18KB  |  471 lines

  1. /***************************************************************************
  2.  
  3.   Black Tiger
  4.  
  5.   Driver provided by Paul Leaman
  6.  
  7.   Thanks to Ishmair for providing information about the screen
  8.   layout on level 3.
  9.  
  10. ***************************************************************************/
  11.  
  12. #include "driver.h"
  13. #include "vidhrdw/generic.h"
  14. #include "cpu/z80/z80.h"
  15.  
  16.  
  17.  
  18. extern unsigned char *blktiger_backgroundram;
  19. extern unsigned char *blktiger_backgroundattribram;
  20. extern size_t blktiger_backgroundram_size;
  21. extern unsigned char *blktiger_palette_bank;
  22. extern unsigned char *blktiger_screen_layout;
  23.  
  24. WRITE_HANDLER( blktiger_palette_bank_w );
  25. WRITE_HANDLER( blktiger_screen_layout_w );
  26.  
  27. READ_HANDLER( blktiger_background_r );
  28. WRITE_HANDLER( blktiger_background_w );
  29. WRITE_HANDLER( blktiger_video_control_w );
  30. WRITE_HANDLER( blktiger_video_enable_w );
  31. WRITE_HANDLER( blktiger_scrollbank_w );
  32. WRITE_HANDLER( blktiger_scrollx_w );
  33. WRITE_HANDLER( blktiger_scrolly_w );
  34.  
  35. int blktiger_interrupt(void);
  36.  
  37. int blktiger_vh_start(void);
  38. void blktiger_vh_stop(void);
  39. void blktiger_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh);
  40.  
  41.  
  42.  
  43. /* this is a protection check. The game crashes (thru a jump to 0x8000) */
  44. /* if a read from this address doesn't return the value it expects. */
  45. static READ_HANDLER( blktiger_protection_r )
  46. {
  47.     int data = cpu_get_reg(Z80_DE) >> 8;
  48.     logerror("protection read, PC: %04x Result:%02x\n",cpu_get_pc(),data);
  49.     return data;
  50. }
  51.  
  52. static WRITE_HANDLER( blktiger_bankswitch_w )
  53. {
  54.     int bankaddress;
  55.     unsigned char *RAM = memory_region(REGION_CPU1);
  56.  
  57.  
  58.     bankaddress = 0x10000 + (data & 0x0f) * 0x4000;
  59.     cpu_setbank(1,&RAM[bankaddress]);
  60. }
  61.  
  62.  
  63.  
  64. static struct MemoryReadAddress readmem[] =
  65. {
  66.     { 0x0000, 0x7fff, MRA_ROM },
  67.     { 0x8000, 0xbfff, MRA_BANK1 },
  68.     { 0xc000, 0xcfff, blktiger_background_r },
  69.     { 0xd000, 0xffff, MRA_RAM },
  70.     { -1 }    /* end of table */
  71. };
  72.  
  73. static struct MemoryWriteAddress writemem[] =
  74. {
  75.     { 0x0000, 0xbfff, MWA_ROM },
  76.     { 0xc000, 0xcfff, blktiger_background_w, &blktiger_backgroundram, &blktiger_backgroundram_size },
  77.     { 0xd000, 0xd3ff, videoram_w, &videoram, &videoram_size },
  78.     { 0xd400, 0xd7ff, colorram_w, &colorram },
  79.     { 0xd800, 0xdbff, paletteram_xxxxBBBBRRRRGGGG_split1_w, &paletteram },
  80.     { 0xdc00, 0xdfff, paletteram_xxxxBBBBRRRRGGGG_split2_w, &paletteram_2 },
  81.     { 0xe000, 0xfdff, MWA_RAM },
  82.     { 0xfe00, 0xffff, MWA_RAM, &spriteram, &spriteram_size },
  83.     { -1 }    /* end of table */
  84. };
  85.  
  86. static struct IOReadPort readport[] =
  87. {
  88.     { 0x00, 0x00, input_port_0_r },
  89.     { 0x01, 0x01, input_port_1_r },
  90.     { 0x02, 0x02, input_port_2_r },
  91.     { 0x03, 0x03, input_port_3_r },
  92.     { 0x04, 0x04, input_port_4_r },
  93.     { 0x05, 0x05, input_port_5_r },
  94.     { 0x07, 0x07, blktiger_protection_r },        /*DPS 980118*/
  95.     { -1 }    /* end of table */
  96. };
  97.  
  98. static struct IOWritePort writeport[] =
  99. {
  100.     { 0x00, 0x00, soundlatch_w },
  101.     { 0x01, 0x01, blktiger_bankswitch_w },
  102.     { 0x04, 0x04, blktiger_video_control_w },
  103.     { 0x06, 0x06, watchdog_reset_w },
  104.     { 0x07, 0x07, IOWP_NOP }, /* Software protection (7) */
  105.     { 0x08, 0x09, blktiger_scrollx_w },
  106.     { 0x0a, 0x0b, blktiger_scrolly_w },
  107.     { 0x0c, 0x0c, blktiger_video_enable_w },
  108.     { 0x0d, 0x0d, blktiger_scrollbank_w },   /* Scroll ram bank register */
  109.     { 0x0e, 0x0e, blktiger_screen_layout_w },/* Video scrolling layout */
  110. #if 0
  111.     { 0x03, 0x03, IOWP_NOP }, /* Unknown port 3 */
  112. #endif
  113.     { -1 }    /* end of table */
  114. };
  115.  
  116.  
  117.  
  118. static struct MemoryReadAddress sound_readmem[] =
  119. {
  120.     { 0x0000, 0x7fff, MRA_ROM },
  121.     { 0xc000, 0xc7ff, MRA_RAM },
  122.     { 0xc800, 0xc800, soundlatch_r },
  123.     { 0xe000, 0xe000, YM2203_status_port_0_r },
  124.     { 0xe001, 0xe001, YM2203_read_port_0_r },
  125.     { 0xe002, 0xe002, YM2203_status_port_1_r },
  126.     { 0xe003, 0xe003, YM2203_read_port_1_r },
  127.     { -1 }    /* end of table */
  128. };
  129.  
  130. static struct MemoryWriteAddress sound_writemem[] =
  131. {
  132.     { 0x0000, 0x7fff, MWA_ROM },
  133.     { 0xc000, 0xc7ff, MWA_RAM },
  134.     { 0xe000, 0xe000, YM2203_control_port_0_w },
  135.     { 0xe001, 0xe001, YM2203_write_port_0_w },
  136.     { 0xe002, 0xe002, YM2203_control_port_1_w },
  137.     { 0xe003, 0xe003, YM2203_write_port_1_w },
  138.     { -1 }    /* end of table */
  139. };
  140.  
  141.  
  142.  
  143. INPUT_PORTS_START( blktiger )
  144.     PORT_START    /* IN0 */
  145.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
  146.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
  147.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )    /* probably unused */
  148.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )    /* probably unused */
  149.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )    /* probably unused */
  150.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN3 )
  151.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
  152.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 )
  153.  
  154.     PORT_START    /* IN1 */
  155.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY )
  156.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY )
  157.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY )
  158.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY )
  159.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
  160.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
  161.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )    /* probably unused */
  162.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )    /* probably unused */
  163.  
  164.     PORT_START    /* IN2 */
  165.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_COCKTAIL )
  166.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY | IPF_COCKTAIL )
  167.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY | IPF_COCKTAIL )
  168.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY | IPF_COCKTAIL )
  169.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_COCKTAIL )
  170.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_COCKTAIL )
  171.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )    /* probably unused */
  172.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )    /* probably unused */
  173.  
  174.     PORT_START    /* DSW0 */
  175.     PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_A ) )
  176.     PORT_DIPSETTING(    0x00, DEF_STR( 4C_1C ) )
  177.     PORT_DIPSETTING(    0x01, DEF_STR( 3C_1C ) )
  178.     PORT_DIPSETTING(    0x02, DEF_STR( 2C_1C ) )
  179.     PORT_DIPSETTING(    0x07, DEF_STR( 1C_1C ) )
  180.     PORT_DIPSETTING(    0x06, DEF_STR( 1C_2C ) )
  181.     PORT_DIPSETTING(    0x05, DEF_STR( 1C_3C ) )
  182.     PORT_DIPSETTING(    0x04, DEF_STR( 1C_4C ) )
  183.     PORT_DIPSETTING(    0x03, DEF_STR( 1C_5C ) )
  184.     PORT_DIPNAME( 0x38, 0x38, DEF_STR( Coin_B ) )
  185.     PORT_DIPSETTING(    0x00, DEF_STR( 4C_1C ) )
  186.     PORT_DIPSETTING(    0x08, DEF_STR( 3C_1C ) )
  187.     PORT_DIPSETTING(    0x10, DEF_STR( 2C_1C ) )
  188.     PORT_DIPSETTING(    0x38, DEF_STR( 1C_1C ) )
  189.     PORT_DIPSETTING(    0x30, DEF_STR( 1C_2C ) )
  190.     PORT_DIPSETTING(    0x28, DEF_STR( 1C_3C ) )
  191.     PORT_DIPSETTING(    0x20, DEF_STR( 1C_4C ) )
  192.     PORT_DIPSETTING(    0x18, DEF_STR( 1C_5C ) )
  193.     PORT_DIPNAME( 0x40, 0x40, DEF_STR( Flip_Screen ) )
  194.     PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
  195.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  196.     PORT_SERVICE( 0x80, IP_ACTIVE_LOW )
  197.  
  198.     PORT_START      /* DSW1 */
  199.     PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) )
  200.     PORT_DIPSETTING(    0x02, "2" )
  201.     PORT_DIPSETTING(    0x03, "3" )
  202.     PORT_DIPSETTING(    0x01, "5" )
  203.     PORT_DIPSETTING(    0x00, "7")
  204.     PORT_DIPNAME( 0x1c, 0x1c, DEF_STR( Difficulty ) )
  205.     PORT_DIPSETTING(    0x1c, "1 (Easiest)")
  206.     PORT_DIPSETTING(    0x18, "2" )
  207.     PORT_DIPSETTING(    0x14, "3" )
  208.     PORT_DIPSETTING(    0x10, "4" )
  209.     PORT_DIPSETTING(    0x0c, "5 (Normal)" )
  210.     PORT_DIPSETTING(    0x08, "6" )
  211.     PORT_DIPSETTING(    0x04, "7" )
  212.     PORT_DIPSETTING(    0x00, "8 (Hardest)" )
  213.     PORT_DIPNAME( 0x20, 0x20, DEF_STR( Demo_Sounds ) )
  214.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  215.     PORT_DIPSETTING(    0x20, DEF_STR( On ) )
  216.     PORT_DIPNAME( 0x40, 0x40, "Allow Continue" )
  217.     PORT_DIPSETTING(    0x00, DEF_STR( No ) )
  218.     PORT_DIPSETTING(    0x40, DEF_STR( Yes ) )
  219.     PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) )
  220.     PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
  221.     PORT_DIPSETTING(    0x80, DEF_STR( Cocktail ) )
  222.  
  223.     PORT_START
  224.     PORT_DIPNAME( 0x01, 0x01, "Freeze" )    /* could be VBLANK */
  225.     PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
  226.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  227. INPUT_PORTS_END
  228.  
  229. static struct GfxLayout charlayout =
  230. {
  231.     8,8,    /* 8*8 characters */
  232.     2048,   /* 2048 characters */
  233.     2,    /* 2 bits per pixel */
  234.     { 4, 0 },
  235.     { 0, 1, 2, 3, 8+0, 8+1, 8+2, 8+3 },
  236.     { 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16 },
  237.     16*8    /* every char takes 16 consecutive bytes */
  238. };
  239.  
  240. static struct GfxLayout spritelayout =
  241. {
  242.     16,16,    /* 16*16 sprites */
  243.     2048,   /* 2048 sprites */
  244.     4,    /* 4 bits per pixel */
  245.     { 0x20000*8+4, 0x20000*8+0, 4, 0 },
  246.     { 0, 1, 2, 3, 8+0, 8+1, 8+2, 8+3,
  247.     32*8+0, 32*8+1, 32*8+2, 32*8+3, 33*8+0, 33*8+1, 33*8+2, 33*8+3 },
  248.     { 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16,
  249.     8*16, 9*16, 10*16, 11*16, 12*16, 13*16, 14*16, 15*16 },
  250.     64*8    /* every sprite takes 64 consecutive bytes */
  251. };
  252.  
  253. static struct GfxDecodeInfo gfxdecodeinfo[] =
  254. {
  255.     { REGION_GFX1, 0, &charlayout,   768, 32 },    /* colors 768 - 895 */
  256.     { REGION_GFX2, 0, &spritelayout,   0, 16 },    /* colors 0 - 255 */
  257.     { REGION_GFX3, 0, &spritelayout, 512,  8 },    /* colors 512 - 639 */
  258.     { -1 } /* end of array */
  259. };
  260.  
  261.  
  262.  
  263. /* handler called by the 2203 emulator when the internal timers cause an IRQ */
  264. static void irqhandler(int irq)
  265. {
  266.     cpu_set_irq_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
  267. }
  268.  
  269. static struct YM2203interface ym2203_interface =
  270. {
  271.     2,            /* 2 chips */
  272.     3579545,    /* 3.579 MHz ? (hand tuned) */
  273.     { YM2203_VOL(15,15), YM2203_VOL(15,15) },
  274.     { 0 },
  275.     { 0 },
  276.     { 0 },
  277.     { 0 },
  278.     { irqhandler }
  279. };
  280.  
  281.  
  282.  
  283. static struct MachineDriver machine_driver_blktiger =
  284. {
  285.     /* basic machine hardware */
  286.     {
  287.         {
  288.             CPU_Z80,
  289.             4000000,    /* 4 Mhz (?) */
  290.             readmem,writemem,readport,writeport,
  291.             interrupt,1
  292.         },
  293.         {
  294.             CPU_Z80 | CPU_AUDIO_CPU,
  295.             3000000,    /* 3 Mhz (?) */
  296.             sound_readmem,sound_writemem,0,0,
  297.             ignore_interrupt,0    /* IRQs are triggered by the YM2203 */
  298.         }
  299.     },
  300.     60, 1500,    /* frames per second, vblank duration - hand tuned to get rid of sprite lag */
  301.     1,    /* 1 CPU slice per frame - interleaving is forced when a sound command is written */
  302.     0,
  303.  
  304.     /* video hardware */
  305.     32*8, 32*8, { 0*8, 32*8-1, 2*8, 30*8-1 },
  306.     gfxdecodeinfo,
  307.     1024, 1024,
  308.     0,
  309.  
  310.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE | VIDEO_UPDATE_AFTER_VBLANK,
  311.     0,
  312.     blktiger_vh_start,
  313.     blktiger_vh_stop,
  314.     blktiger_vh_screenrefresh,
  315.  
  316.     /* sound hardware */
  317.     0,0,0,0,
  318.     {
  319.         {
  320.             SOUND_YM2203,
  321.             &ym2203_interface
  322.         }
  323.     }
  324. };
  325.  
  326.  
  327. /***************************************************************************
  328.  
  329.   Game driver(s)
  330.  
  331. ***************************************************************************/
  332.  
  333. ROM_START( blktiger )
  334.     ROM_REGION( 0x50000, REGION_CPU1 )    /* 64k for code + banked ROMs images */
  335.     ROM_LOAD( "blktiger.5e",  0x00000, 0x08000, 0xa8f98f22 )    /* CODE */
  336.     ROM_LOAD( "blktiger.6e",  0x10000, 0x10000, 0x7bef96e8 )    /* 0+1 */
  337.     ROM_LOAD( "blktiger.8e",  0x20000, 0x10000, 0x4089e157 )    /* 2+3 */
  338.     ROM_LOAD( "blktiger.9e",  0x30000, 0x10000, 0xed6af6ec )    /* 4+5 */
  339.     ROM_LOAD( "blktiger.10e", 0x40000, 0x10000, 0xae59b72e )    /* 6+7 */
  340.  
  341.     ROM_REGION( 0x10000, REGION_CPU2 )    /* 64k for the audio CPU */
  342.     ROM_LOAD( "blktiger.1l",  0x0000, 0x8000, 0x2cf54274 )
  343.  
  344.     ROM_REGION( 0x08000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  345.     ROM_LOAD( "blktiger.2n",  0x00000, 0x08000, 0x70175d78 )    /* characters */
  346.  
  347.     ROM_REGION( 0x40000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  348.     ROM_LOAD( "blktiger.5b",  0x00000, 0x10000, 0xc4524993 )    /* tiles */
  349.     ROM_LOAD( "blktiger.4b",  0x10000, 0x10000, 0x7932c86f )
  350.     ROM_LOAD( "blktiger.9b",  0x20000, 0x10000, 0xdc49593a )
  351.     ROM_LOAD( "blktiger.8b",  0x30000, 0x10000, 0x7ed7a122 )
  352.  
  353.     ROM_REGION( 0x40000, REGION_GFX3 | REGIONFLAG_DISPOSE )
  354.     ROM_LOAD( "blktiger.5a",  0x00000, 0x10000, 0xe2f17438 )    /* sprites */
  355.     ROM_LOAD( "blktiger.4a",  0x10000, 0x10000, 0x5fccbd27 )
  356.     ROM_LOAD( "blktiger.9a",  0x20000, 0x10000, 0xfc33ccc6 )
  357.     ROM_LOAD( "blktiger.8a",  0x30000, 0x10000, 0xf449de01 )
  358.  
  359.     ROM_REGION( 0x0400, REGION_PROMS )    /* PROMs (function unknown) */
  360.     ROM_LOAD( "mb7114e.8j",   0x0000, 0x0100, 0x29b459e5 )
  361.     ROM_LOAD( "mb7114e.9j",   0x0100, 0x0100, 0x8b741e66 )
  362.     ROM_LOAD( "mb7114e.11k",  0x0200, 0x0100, 0x27201c75 )
  363.     ROM_LOAD( "mb7114e.11l",  0x0300, 0x0100, 0xe5490b68 )
  364. ROM_END
  365.  
  366. ROM_START( bktigerb )
  367.     ROM_REGION( 0x50000, REGION_CPU1 )    /* 64k for code + banked ROMs images */
  368.     ROM_LOAD( "btiger1.f6",   0x00000, 0x08000, 0x9d8464e8 )    /* CODE */
  369.     ROM_LOAD( "blktiger.6e",  0x10000, 0x10000, 0x7bef96e8 )    /* 0+1 */
  370.     ROM_LOAD( "btiger3.j6",   0x20000, 0x10000, 0x52c56ed1 )    /* 2+3 */
  371.     ROM_LOAD( "blktiger.9e",  0x30000, 0x10000, 0xed6af6ec )    /* 4+5 */
  372.     ROM_LOAD( "blktiger.10e", 0x40000, 0x10000, 0xae59b72e )    /* 6+7 */
  373.  
  374.     ROM_REGION( 0x10000, REGION_CPU2 )    /* 64k for the audio CPU */
  375.     ROM_LOAD( "blktiger.1l",  0x0000, 0x8000, 0x2cf54274 )
  376.  
  377.     ROM_REGION( 0x08000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  378.     ROM_LOAD( "blktiger.2n",  0x00000, 0x08000, 0x70175d78 )    /* characters */
  379.  
  380.     ROM_REGION( 0x40000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  381.     ROM_LOAD( "blktiger.5b",  0x00000, 0x10000, 0xc4524993 )    /* tiles */
  382.     ROM_LOAD( "blktiger.4b",  0x10000, 0x10000, 0x7932c86f )
  383.     ROM_LOAD( "blktiger.9b",  0x20000, 0x10000, 0xdc49593a )
  384.     ROM_LOAD( "blktiger.8b",  0x30000, 0x10000, 0x7ed7a122 )
  385.  
  386.     ROM_REGION( 0x40000, REGION_GFX3 | REGIONFLAG_DISPOSE )
  387.     ROM_LOAD( "blktiger.5a",  0x00000, 0x10000, 0xe2f17438 )    /* sprites */
  388.     ROM_LOAD( "blktiger.4a",  0x10000, 0x10000, 0x5fccbd27 )
  389.     ROM_LOAD( "blktiger.9a",  0x20000, 0x10000, 0xfc33ccc6 )
  390.     ROM_LOAD( "blktiger.8a",  0x30000, 0x10000, 0xf449de01 )
  391.  
  392.     ROM_REGION( 0x0400, REGION_PROMS )    /* PROMs (function unknown) */
  393.     ROM_LOAD( "mb7114e.8j",   0x0000, 0x0100, 0x29b459e5 )
  394.     ROM_LOAD( "mb7114e.9j",   0x0100, 0x0100, 0x8b741e66 )
  395.     ROM_LOAD( "mb7114e.11k",  0x0200, 0x0100, 0x27201c75 )
  396.     ROM_LOAD( "mb7114e.11l",  0x0300, 0x0100, 0xe5490b68 )
  397. ROM_END
  398.  
  399. ROM_START( blkdrgon )
  400.     ROM_REGION( 0x50000, REGION_CPU1 )    /* 64k for code + banked ROMs images */
  401.     ROM_LOAD( "blkdrgon.5e",  0x00000, 0x08000, 0x27ccdfbc )    /* CODE */
  402.     ROM_LOAD( "blkdrgon.6e",  0x10000, 0x10000, 0x7d39c26f )    /* 0+1 */
  403.     ROM_LOAD( "blkdrgon.8e",  0x20000, 0x10000, 0xd1bf3757 )    /* 2+3 */
  404.     ROM_LOAD( "blkdrgon.9e",  0x30000, 0x10000, 0x4d1d6680 )    /* 4+5 */
  405.     ROM_LOAD( "blkdrgon.10e", 0x40000, 0x10000, 0xc8d0c45e )    /* 6+7 */
  406.  
  407.     ROM_REGION( 0x10000, REGION_CPU2 )    /* 64k for the audio CPU */
  408.     ROM_LOAD( "blktiger.1l",  0x0000, 0x8000, 0x2cf54274 )
  409.  
  410.     ROM_REGION( 0x08000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  411.     ROM_LOAD( "blkdrgon.2n",  0x00000, 0x08000, 0x3821ab29 )    /* characters */
  412.  
  413.     ROM_REGION( 0x40000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  414.     ROM_LOAD( "blkdrgon.5b",  0x00000, 0x10000, 0x22d0a4b0 )    /* tiles */
  415.     ROM_LOAD( "blkdrgon.4b",  0x10000, 0x10000, 0xc8b5fc52 )
  416.     ROM_LOAD( "blkdrgon.9b",  0x20000, 0x10000, 0x9498c378 )
  417.     ROM_LOAD( "blkdrgon.8b",  0x30000, 0x10000, 0x5b0df8ce )
  418.  
  419.     ROM_REGION( 0x40000, REGION_GFX3 | REGIONFLAG_DISPOSE )
  420.     ROM_LOAD( "blktiger.5a",  0x00000, 0x10000, 0xe2f17438 )    /* sprites */
  421.     ROM_LOAD( "blktiger.4a",  0x10000, 0x10000, 0x5fccbd27 )
  422.     ROM_LOAD( "blktiger.9a",  0x20000, 0x10000, 0xfc33ccc6 )
  423.     ROM_LOAD( "blktiger.8a",  0x30000, 0x10000, 0xf449de01 )
  424.  
  425.     ROM_REGION( 0x0400, REGION_PROMS )    /* PROMs (function unknown) */
  426.     ROM_LOAD( "mb7114e.8j",   0x0000, 0x0100, 0x29b459e5 )
  427.     ROM_LOAD( "mb7114e.9j",   0x0100, 0x0100, 0x8b741e66 )
  428.     ROM_LOAD( "mb7114e.11k",  0x0200, 0x0100, 0x27201c75 )
  429.     ROM_LOAD( "mb7114e.11l",  0x0300, 0x0100, 0xe5490b68 )
  430. ROM_END
  431.  
  432. ROM_START( blkdrgnb )
  433.     ROM_REGION( 0x50000, REGION_CPU1 )    /* 64k for code + banked ROMs images */
  434.     ROM_LOAD( "j1-5e",        0x00000, 0x08000, 0x97e84412 )    /* CODE */
  435.     ROM_LOAD( "blkdrgon.6e",  0x10000, 0x10000, 0x7d39c26f )    /* 0+1 */
  436.     ROM_LOAD( "j3-8e",        0x20000, 0x10000, 0xf4cd0f39 )    /* 2+3 */
  437.     ROM_LOAD( "blkdrgon.9e",  0x30000, 0x10000, 0x4d1d6680 )    /* 4+5 */
  438.     ROM_LOAD( "blkdrgon.10e", 0x40000, 0x10000, 0xc8d0c45e )    /* 6+7 */
  439.  
  440.     ROM_REGION( 0x10000, REGION_CPU2 )    /* 64k for the audio CPU */
  441.     ROM_LOAD( "blktiger.1l",  0x0000, 0x8000, 0x2cf54274 )
  442.  
  443.     ROM_REGION( 0x08000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  444.     ROM_LOAD( "j15-2n",       0x00000, 0x08000, 0x852ad2b7 )    /* characters */
  445.  
  446.     ROM_REGION( 0x40000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  447.     ROM_LOAD( "blkdrgon.5b",  0x00000, 0x10000, 0x22d0a4b0 )    /* tiles */
  448.     ROM_LOAD( "j11-4b",       0x10000, 0x10000, 0x053ab15c )
  449.     ROM_LOAD( "blkdrgon.9b",  0x20000, 0x10000, 0x9498c378 )
  450.     ROM_LOAD( "j13-8b",       0x30000, 0x10000, 0x663d5afa )
  451.  
  452.     ROM_REGION( 0x40000, REGION_GFX3 | REGIONFLAG_DISPOSE )
  453.     ROM_LOAD( "blktiger.5a",  0x00000, 0x10000, 0xe2f17438 )    /* sprites */
  454.     ROM_LOAD( "blktiger.4a",  0x10000, 0x10000, 0x5fccbd27 )
  455.     ROM_LOAD( "blktiger.9a",  0x20000, 0x10000, 0xfc33ccc6 )
  456.     ROM_LOAD( "blktiger.8a",  0x30000, 0x10000, 0xf449de01 )
  457.  
  458.     ROM_REGION( 0x0400, REGION_PROMS )    /* PROMs (function unknown) */
  459.     ROM_LOAD( "mb7114e.8j",   0x0000, 0x0100, 0x29b459e5 )
  460.     ROM_LOAD( "mb7114e.9j",   0x0100, 0x0100, 0x8b741e66 )
  461.     ROM_LOAD( "mb7114e.11k",  0x0200, 0x0100, 0x27201c75 )
  462.     ROM_LOAD( "mb7114e.11l",  0x0300, 0x0100, 0xe5490b68 )
  463. ROM_END
  464.  
  465.  
  466.  
  467. GAMEX( 1987, blktiger, 0,        blktiger, blktiger, 0, ROT0, "Capcom", "Black Tiger", GAME_NO_COCKTAIL )
  468. GAMEX( 1987, bktigerb, blktiger, blktiger, blktiger, 0, ROT0, "bootleg", "Black Tiger (bootleg)", GAME_NO_COCKTAIL )
  469. GAMEX( 1987, blkdrgon, blktiger, blktiger, blktiger, 0, ROT0, "Capcom", "Black Dragon", GAME_NO_COCKTAIL )
  470. GAMEX( 1987, blkdrgnb, blktiger, blktiger, blktiger, 0, ROT0, "bootleg", "Black Dragon (bootleg)", GAME_NO_COCKTAIL )
  471.